package com.sun.showcase.client.domain.mall;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.ibatis.type.Alias;

@Alias("goodsCollcetion")
public class Collection implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
    /**
     * id       db_column: id 
     */	
	private String id;
    /**
     * 用户id       db_column: user_id
     */
	private String userId;
    /**
     * 用户名       db_column: user_name
     */
	private String userName;
    /**
     * 店铺id       db_column: shop_id
     */
	private String shopId;
    /**
     * 商品id       db_column: goods_id
     */
	private String goodsId;
    /**
     * 商品名       db_column: goods_name
     */
	private String goodsName;
    /**
     * 收藏时间       db_column: create_date
     */
	private java.util.Date createDate;

	private String mainImg;
	//columns END

	public Collection(){
	}

	public Collection(
		String id
	){
		this.id = id;
	}

	public String getMainImg() {
		return mainImg;
	}

	public void setMainImg(String mainImg) {
		this.mainImg = mainImg;
	}

	public void setId(String value) {
		this.id = value;
	}

	public String getId() {
		return this.id;
	}
	public void setUserId(String value) {
		this.userId = value;
	}

	public String getUserId() {
		return this.userId;
	}
	public void setUserName(String value) {
		this.userName = value;
	}

	public String getUserName() {
		return this.userName;
	}
	public void setShopId(String value) {
		this.shopId = value;
	}

	public String getShopId() {
		return this.shopId;
	}
	public void setGoodsId(String value) {
		this.goodsId = value;
	}

	public String getGoodsId() {
		return this.goodsId;
	}
	public void setGoodsName(String value) {
		this.goodsName = value;
	}

	public String getGoodsName() {
		return this.goodsName;
	}
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Collection == false) return false;
		if(this == obj) return true;
		Collection other = (Collection)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

